<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require ('db_conn.php');//包含连接文件
 
 $sql="SELECT * FROM db_servicetype ";   //写新闻类别查询语句  

    $tprs=$db->query($sql); //执行语句  $rs是一个结果集

    $tprows=$tprs->fetch_all(MYSQLI_BOTH);   //包括所有行   */
//获取新闻具体内容

    $typeid=isset($_GET['tid'])?$_GET['tid']:-1;

    if ($typeid==-1)
       $sql="select a.*,b.typename from db_service a,db_servicetype b  where a.typeid=b.id ";   //写新闻查询语句  
    else
       $sql="select a.*,b.typename from db_service a,db_servicetype b  where a.typeid=b.id and a.typeid=$typeid";   //写新闻查询语句   
    $xwrs=$db->query($sql); //执行语句  $rs是一个结果集
    $xwrows=$xwrs->fetch_all(MYSQLI_BOTH);   //包括所有行   */
require 'service_html.php';
//释放结果集

$tprs->free();

//关闭数据库

$db->close();
